package com.a1808.dubbo;

import java.io.IOException;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.a1808.dubbo.entity.Goods;
import com.a1808.dubbo.service.GoodsService;

public class TestConsumer {
	
	public static void main(String[] args) throws IOException {
		
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("classpath:app-consumer.xml");
		// 获取调用服务的本地代理对象
		GoodsService service = context.getBean(GoodsService.class);
		//测试添加
		service.add(new Goods());
		//测试获取
		Goods goods = service.getGoods(20);
		System.out.println("goods is " + goods);
		
		System.in.read();
		
		
	}

}
